package com.surpermaket.service.impl;

import com.surpermaket.entity.Menu;
import com.surpermaket.mapper.MenuMapper;
import com.surpermaket.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuServiceImpl implements MenuService {

    @Autowired
    private MenuMapper menuMapper;

    @Override
    public List<Menu> selectAll() {
        return menuMapper.selectAll();
    }

    @Override
    public int insert(Menu menu) {
        return menuMapper.insert(menu);
    }

    @Override
    public int deleteById(Long id) {
        return menuMapper.deleteById(id);
    }

    @Override
    public List<Menu> selectOne() {
        return menuMapper.selectOne();
    }

    @Override
    public List<Menu> selectTwo(Long value) {
        return menuMapper.selectTwo(value);
    }

    @Override
    public int Update(Menu menu) {
        return menuMapper.Update(menu);
    }
}
